package com.cskaoyan.service;

import com.cskaoyan.bean.Admin;
import com.cskaoyan.bean.Info;
import com.cskaoyan.bean.admin.PageAdmins;
import com.cskaoyan.bean.admin.bo.AdminListBo;
import com.cskaoyan.bean.admin.bo.CreateAdminBo;
import com.cskaoyan.bean.admin.bo.DeleteAdminBO;
import com.cskaoyan.bean.admin.vo.CreateAdminVo;
import com.cskaoyan.bean.auth.bo.AuthLoginBo;
import com.cskaoyan.exeception.BrockenHeartOfMing;

import java.sql.SQLException;
import java.util.ArrayList;

public interface AdminService {

    PageAdmins getAdminList(AdminListBo bo);

    int deleteAdmin(DeleteAdminBO bo);

    CreateAdminVo createAdmin(CreateAdminBo bo);

    Admin updateAdmin(String currentName, Admin admin) throws SQLException, IllegalAccessException, BrockenHeartOfMing;

    boolean deleteRoleFromAllAdmin(int roleId);

    Admin login(AuthLoginBo loginBo);

    ArrayList<String> getPerms(Admin admin);

    int getLastLoginIp(String remoteAddr, Integer adminId);

    int getLastLoginTime(Integer adminId);

    ArrayList<String> getRoles(Admin admin);

}
